package com.ruoyi.project.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.Arrays;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.system.domain.TRecruitPerson;
import com.ruoyi.project.system.mapper.TRecruitPersonMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.TRecruitPersonExamineMapper;
import com.ruoyi.project.system.domain.TRecruitPersonExamine;
import com.ruoyi.project.system.service.ITRecruitPersonExamineService;

/**
 * 见习记录Service业务层处理
 *
 * @author ruoyi
 * @date 2021-09-12
 */
@Service
public class TRecruitPersonExamineServiceImpl extends ServiceImpl<TRecruitPersonExamineMapper,TRecruitPersonExamine> implements ITRecruitPersonExamineService
{
    @Autowired
    private TRecruitPersonExamineMapper tRecruitPersonExamineMapper;

    @Autowired
    private TRecruitPersonMapper tRecruitPersonMapper;

    /**
     * 查询见习记录
     *
     * @param id 见习记录主键
     * @return 见习记录
     */
    @Override
    public TRecruitPersonExamine selectTRecruitPersonExamineById(String id)
    {
        return tRecruitPersonExamineMapper.selectTRecruitPersonExamineById(id);
    }

    /**
     * 查询见习记录列表
     *
     * @param tRecruitPersonExamine 见习记录
     * @return 见习记录
     */
    @Override
    public List<TRecruitPersonExamine> selectTRecruitPersonExamineList(TRecruitPersonExamine tRecruitPersonExamine)
    {
        return tRecruitPersonExamineMapper.selectTRecruitPersonExamineList(tRecruitPersonExamine);
    }

    @Override
    public TRecruitPersonExamine getDetailById(String id) {
        TRecruitPersonExamine byId = super.getById(id);
        TRecruitPerson tRecruitPerson = tRecruitPersonMapper.selectById(byId.getPersonId());
        byId.setName(tRecruitPerson.getName());
        return byId;
    }


}